<?php

require_once ('BaseAjaxModule.php');

class NewsModule extends BaseAjaxModule {
	
	public function getNewsListTask()	{
		$page = $this->getParam('page');
		$page_size = $this->getParam('page_size');
		$this->view->result = Model_News::getNewsList($page,$page_size);
	}
	
	public function getNewsDetailTask(){
		$news = new Model_News();
		$news->id = $this->getParam('id');
		$news->connect();
		$this->view->result = $news->getNewsDetail();
	}
	
}

?>